<template>
  <div>
    <div id="wx_leida"></div>
  </div>
</template>
<script>
var echarts = require("echarts");
export default {
  mounted() {},
  methods: {
    show_chart(wx_arr) {
      // 基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById("wx_leida"));
      // 绘制图表
      myChart.setOption({
        tooltip: {},
        legend: {
          data: [""]
        },
        radar: {
          // shape: 'circle',
          name: {
            textStyle: {
              color: "#fff",
              backgroundColor: "red",
              borderRadius: 3,
              padding: [3, 5]
            }
          },
          indicator: [
            { name: "金", max: 5 },
            { name: "木", max: 5 },
            { name: "水", max: 5 },
            { name: "火", max: 5 },
            { name: "土", max: 5 }
          ]
        },
        series: [
          {
            name: "五行分析",
            type: "radar",
            // areaStyle: {normal: {}},
            data: [
              {
                value: wx_arr,
                name: "五行分析"
              }
            ]
          }
        ]
      });
    }
  }
};
</script>
<style scoped>
#wx_leida {
  width: 100%;
  height: 300px;
}
</style>

